package com.wgy.day12.Scanner键盘输入;

/**
 * Created by pc on 2020/11/7 22:02
 * Description: LearningJava
 */

import java.util.Scanner;


public class Demo01Scanner1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //注意: Scanner类的构造方法中()中必须有内容
        while(true){
            int num = sc.nextInt();                  //  方法的调用    将键盘输入的字符串转化成int类数值
            System.out.println("输入的int数字是:" + num);//
            //String str = sc.next();                 //键盘输入的类型全部都是字符串
           // System.out.println("输入的字符串是:" + str);
        }



    }
}
